package ui.newgamescreen.listeners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JComboBox;
import javax.swing.JSpinner;

import ui.mainscreen.MainScreenPanel;

public class universeFormListener implements ActionListener {

	private JSpinner clusterQuantityChooser;

	public universeFormListener(JSpinner clusterQuantityChooser) {
		this.clusterQuantityChooser = clusterQuantityChooser;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		JComboBox box = (JComboBox) e.getSource();
		String item = (String) box.getSelectedItem();
		if (item == "Кластерная") {
			clusterQuantityChooser.setEnabled(true);
		} else {
			clusterQuantityChooser.setEnabled(false);
		}

	}

}
